package com.acetech.admin.web.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单
 **/
public class Menu {

    private String name;
    private String url;
    private String icon;
    private String resCode;
    private List<Menu> children;

    public Menu() {
    }

    public String getResCode() {
        return resCode;
    }


    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public Menu(String name, String url, String icon, String resCode) {
        this.name = name;
        this.url = url;
        this.icon = icon;
        this.resCode = resCode;

    }

    public Menu addSub(Menu menu) {
        if (children == null) {
            children = new ArrayList<>();
        }
        children.add(menu);
        return this;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }
}
